<?php
if (empty($_FILES) || $_FILES["file"]["error"]) {
  die('{"OK": 0}');
}
 $fileName = isset($_REQUEST["key"])&& isset($_REQUEST["name"]) ? $_REQUEST["key"].'_'.$_REQUEST["name"] : $_FILES["file"]["name"];
// $fileName = $_FILES["file"]["name"];
move_uploaded_file($_FILES["file"]["tmp_name"], "../upload/$fileName");
 
die('{"name":"'.$fileName.'"}');
?>